package com.iweb.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author iweb002
 * @WebServlet :请求的路径   http://127.0.0.1:8080/servlet-helloworld/hello1
 */
public class HelloServlet extends HttpServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
       
        PrintWriter write= resp.getWriter();
        write.append("hello world by web.xml");
        write.close();
        super.service(req, resp);
    }

}
